<?
require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/prolog_before.php");
if ($_REQUEST["USER_EMAIL"] || $_REQUEST["USER_LOGIN"]):
	if ($_REQUEST["USER_LOGIN"]):
		if (CUser::GetByLogin($_REQUEST["USER_LOGIN"])->fetch()):
			echo 1;
		else:
			echo 0;
		endif;
	else:
	
		if (CUser::GetList( ($by="id"), ($order="desc"), array("EMAIL"=>$_REQUEST["USER_EMAIL"]) )->fetch()):
			echo 1;
		else:
			echo 0;
		endif;
	endif;
else:
	echo 2;
endif;
?>